/**
 * @author Mas0n
 * @description router全局配置，如有必要可分文件抽离，其中asyncRoutes只有在intelligence模式下才会用到，pro版只支持remixIcon图标
 * hidden:true                    是否显示在菜单中显示路由（默认值：false）
 * alwaysShow:true                当只有一级子路由时是否显示父路由是否显示在菜单中显示路由（默认值：false）
 * name:"Demo"                    首字母大写，一定要与vue文件的name对应起来，用于noKeepAlive缓存控制（该项特别重要）
 * meta:{
    title:"title"                 菜单、面包屑、多标签页显示的名称
    roles:["admin","..."]         当config/settings.js中rolesControl配置开启时，用于控制角色
    roles: {
      role: ["admin"],
      ability: ["READ","WRITE","DELETE"],         ability: ["READ","WRITE"],
      mode: "allOf"              allOf: 数组内所有角色都拥有，返回True oneOf: 数组内拥有任一角色，返回True(等价第1种数据) except: 不拥有数组内任一角色，返回True(取反)
     }
    remixIcon:""                  remix图标
    isCustomSvgIcon:false,        是否是自定义svg图标（默认值：false，如果设置true，那么需要把你的svg拷贝到icon/remixIcon下，然后remixIcon字段配置上你的图标名）
    noKeepAlive:true              当前路由是否不缓存（默认值：false）
    affix:true                    当前路由是否固定多标签页
    badge:"New"                   badge小标签（只支持子级）
    tagHidden:true                当前路由是否不显示多标签页
   }
 */
const data = [
  {
    path: '/',
    component: 'Layout',
    redirect: '/index',
    meta: { title: '\u9996\u9875', remixIcon: 'home-4-line', affix: true },
    children: [
      {
        path: 'index',
        name: 'Index',
        component: '@views/index',
        meta: {
          title: '\u9996\u9875',
          remixIcon: 'home-4-line',
          affix: true,
        },
      },
    ],
  },
  {
    path: '/amf',
    name: 'Amf',
    component: 'Layout',
    redirect: '/amf/icon/remixIcon',
    alwaysShow: true,
    meta: { title: '\u7ec4\u4ef6', remixIcon: 'code-box-line' },
    children: [
      {
        path: 'roles',
        name: 'Role',
        component: '@views/amf/roles',
        meta: {
          title: '\u89d2\u8272\u6743\u9650\u63a7\u5236',
          remixIcon: 'user-3-line',
          badge: 'New',
        },
      },
      {
        path: 'icon',
        name: 'Icon',
        component: '@views/amf/icon',
        redirect: '/amf/icon/remixIcon',
        meta: { title: '\u56fe\u6807', remixIcon: 'remixicon-line' },
        children: [
          {
            path: 'remixIcon',
            name: 'RemixIcon',
            component: '@views/amf/icon/remixIcon',
            meta: { title: '\u5c0f\u6e05\u65b0\u56fe\u6807' },
          },
          {
            path: 'colorfulIcon',
            name: 'ColorfulIcon',
            component: '@views/amf/icon/colorfulIcon',
            meta: { title: '\u591a\u5f69\u56fe\u6807' },
          },
          {
            path: 'iconSelector',
            name: 'IconSelector',
            component: '@views/amf/icon/iconSelector',
            meta: { title: '\u56fe\u6807\u9009\u62e9\u5668' },
          },
        ],
      },
      {
        path: 'table',
        name: 'Table',
        component: '@views/amf/table',
        redirect: '/amf/table/comprehensiveTable',
        meta: {
          title: '\u8868\u683c',
          roles: { role: ['editor'], mode: 'except' },
          remixIcon: 'table-2',
        },
        children: [
          {
            path: 'comprehensiveTable',
            name: 'ComprehensiveTable',
            component: '@views/amf/table/comprehensiveTable',
            meta: { title: '\u7efc\u5408\u8868\u683c' },
          },
          {
            path: 'inlineEditTable',
            name: 'InlineEditTable',
            component: '@views/amf/table/inlineEditTable',
            meta: {
              title: '\u884c\u5185\u7f16\u8f91\u8868\u683c',
              noKeepAlive: true,
            },
          },
          {
            path: 'customTable',
            name: 'CustomTable',
            component: '@views/amf/table/customTable',
            meta: { title: '\u81ea\u5b9a\u4e49\u8868\u683c', badge: 'New' },
          },
        ],
      },
      {
        path: 'form',
        component: '@views/amf/form',
        name: 'Form',
        meta: {
          title: '\u8868\u5355',
          roles: ['admin'],
          remixIcon: 'file-list-2-line',
        },
        children: [
          {
            path: 'comprehensiveForm',
            name: 'ComprehensiveForm',
            component: '@views/amf/form/comprehensiveForm',
            meta: { title: '\u7efc\u5408\u8868\u5355' },
          },
          {
            path: 'stepForm',
            name: 'StepForm',
            component: '@views/amf/form/stepForm',
            meta: { title: '\u5206\u6b65\u8868\u5355' },
          },
        ],
      },
      {
        path: 'drag',
        name: 'Drag',
        component: '@views/amf/drag',
        redirect: '/amf/drag/dialogDrag',
        meta: {
          title: '\u62d6\u62fd',
          roles: ['admin'],
          remixIcon: 'table-2',
        },
        children: [
          {
            path: 'dialogDrag',
            name: 'DialogDrag',
            component: '@views/amf/drag/dialogDrag',
            meta: { title: '\u5f39\u7a97\u62d6\u62fd' },
          },
          {
            path: 'cardDrag',
            name: 'cardDrag',
            component: '@views/amf/drag/cardDrag',
            meta: { title: '\u5361\u7247\u62d6\u62fd' },
          },
        ],
      },
      {
        path: 'contextmenu',
        name: 'Contextmenu',
        component: '@views/amf/contextmenu',
        meta: {
          title: '\u53f3\u952e\u83dc\u5355',
          roles: ['admin'],
          remixIcon: 'menu-2-fill',
          badge: 'New',
        },
      },
      {
        path: 'card',
        name: 'Card',
        component: '@views/amf/card',
        meta: {
          title: '\u5361\u7247',
          roles: ['admin'],
          remixIcon: 'inbox-line',
          badge: 'New',
        },
      },
      {
        path: 'editor',
        name: 'Editor',
        component: '@views/amf/editor',
        meta: {
          title: '\u7f16\u8f91\u5668',
          roles: ['admin'],
          remixIcon: 'edit-2-line',
        },
        children: [
          {
            path: 'richTextEditor',
            name: 'RichTextEditor',
            component: '@views/amf/editor/richTextEditor',
            meta: {
              title: '\u5bcc\u6587\u672c\u7f16\u8f91\u5668',
              roles: ['admin'],
            },
          },
          {
            path: 'markdownEditor',
            name: 'MarkdownEditor',
            component: '@views/amf/editor/markdownEditor',
            meta: { title: 'Markdown\u7f16\u8f91\u5668', roles: ['admin'] },
          },
        ],
      },
      {
        path: 'map',
        component: '@views/amf/map',
        name: 'Map',
        meta: {
          title: '\u5730\u56fe',
          roles: ['admin'],
          remixIcon: 'map-2-line',
        },
      },
      {
        path: 'menu1',
        name: 'Menu1',
        component: '@views/amf/nested/menu1',
        redirect: '/amf/menu1/menu1-1/menu1-1-1',
        alwaysShow: true,
        meta: {
          title: '\u5d4c\u5957\u8def\u75311',
          roles: ['admin'],
          remixIcon: 'route-line',
        },
        children: [
          {
            path: 'menu1-1',
            name: 'Menu1-1',
            alwaysShow: true,
            component: '@views/amf/nested/menu1/menu1-1',
            redirect: '/amf/menu1/menu1-1/menu1-1-1',
            meta: { title: '\u5d4c\u5957\u8def\u75311-1' },
            children: [
              {
                path: 'menu1-1-1',
                name: 'Menu1-1-1',
                meta: { title: '\u5d4c\u5957\u8def\u75311-1-1' },
                component: '@views/amf/nested/menu1/menu1-1/menu1-1-1',
              },
            ],
          },
        ],
      },
      {
        path: 'loading',
        name: 'Loading',
        component: '@views/amf/loading',
        meta: {
          title: '\u52a0\u8f7d',
          roles: ['admin'],
          remixIcon: 'loader-line',
        },
      },
      {
        path: 'player',
        name: 'Player',
        component: '@views/amf/player',
        meta: {
          title: '\u89c6\u9891\u64ad\u653e\u5668',
          roles: ['admin'],
          remixIcon: 'video-line',
        },
      },
      {
        path: 'upload',
        name: 'Upload',
        component: '@views/amf/upload',
        meta: {
          title: '\u4e0a\u4f20',
          roles: ['admin'],
          remixIcon: 'chat-upload-line',
        },
      },
      {
        path: 'log',
        name: 'Log',
        component: '@views/amf/errorLog',
        meta: {
          title: '\u9519\u8bef\u65e5\u5fd7\u6a21\u62df',
          roles: ['admin'],
          remixIcon: 'error-warning-line',
        },
      },
      {
        path: 'cssfx',
        name: 'Cssfx',
        component: '@views/amf/cssfx',
        meta: {
          title: 'Css\u52a8\u753b',
          roles: ['admin'],
          remixIcon: 'css3-line',
          badge: 'New',
        },
      },
      {
        path: 'social',
        name: 'Social',
        component: '@views/amf/social',
        meta: {
          title: '\u7b2c\u4e09\u65b9\u767b\u5f55',
          roles: ['admin'],
          remixIcon: 'github-fill',
          badge: 'New',
        },
      },
      {
        path:
          'https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension',
        name: 'ExternalLink',
        meta: {
          title: '\u5916\u94fe',
          target: '_blank',
          roles: { role: ['admin', 'editor'], mode: 'oneOf' },
          remixIcon: 'external-link-line',
        },
      },
      {
        path: 'excel',
        name: 'Excel',
        component: '@views/amf/excel',
        redirect: '/amf/excel/exportExcel',
        meta: {
          title: 'Excel',
          roles: ['admin'],
          remixIcon: 'file-excel-2-line',
        },
        children: [
          {
            path: 'exportExcel',
            name: 'ExportExcel',
            component: '@views/amf/excel/exportExcel',
            meta: { title: '\u5bfc\u51faExcel' },
          },
          {
            path: 'exportSelectedExcel',
            name: 'SelectExcel',
            component: '@views/amf/excel/exportSelectExcel',
            meta: { title: '\u5bfc\u51fa\u9009\u4e2d\u884cExcel' },
          },
          {
            path: 'exportMergeHeaderExcel',
            name: 'MergeHeaderExcel',
            component: '@views/amf/excel/exportMergeHeaderExcel',
            meta: { title: '\u5bfc\u51fa\u5408\u5e76Excel' },
          },
        ],
      },
    ],
  },
  {
    path: '/mall',
    name: 'Mall',
    component: 'Layout',
    redirect: '/mall/goods',
    meta: {
      title: '\u7269\u6599\u6e90',
      remixIcon: 'apps-line',
      roles: ['admin'],
    },
    children: [
      {
        path: 'goods',
        name: 'GoodsList',
        component: '@views/mall/goods',
        meta: {
          title: '\u7269\u6599\u5e02\u573a',
          remixIcon: 'shopping-cart-line',
        },
      },
    ],
  },
  {
    path: '/setting',
    name: 'PersonnelManagement',
    component: 'Layout',
    redirect: '/setting/userManagement',
    meta: {
      title: '\u914d\u7f6e',
      remixIcon: 'user-settings-line',
      roles: ['admin'],
    },
    children: [
      {
        path: 'userManagement',
        name: 'UserManagement',
        component: '@views/setting/userManagement',
        meta: {
          title: '\u7528\u6237\u7ba1\u7406',
          remixIcon: 'user-3-line',
        },
      },
      {
        path: 'roleManagement',
        name: 'RoleManagement',
        component: '@views/setting/roleManagement',
        meta: {
          title: '\u89d2\u8272\u7ba1\u7406',
          remixIcon: 'admin-line',
        },
      },
      {
        path: 'departmentManagement',
        name: 'DepartmentManagemen',
        component: '@views/setting/departmentManagement',
        meta: {
          title: '\u90e8\u95e8\u7ba1\u7406',
          remixIcon: 'group-line',
        },
      },
      {
        path: 'menuManagement',
        name: 'MenuManagement',
        component: '@views/setting/menuManagement',
        meta: {
          title: '\u83dc\u5355\u7ba1\u7406',
          badge: 'New',
          remixIcon: 'menu-2-fill',
        },
      },
    ],
  },
  {
    path: '/error',
    name: 'Error',
    component: 'Layout',
    redirect: '/error/401',
    meta: { title: '\u9519\u8bef\u9875', remixIcon: 'error-warning-line' },
    children: [
      {
        path: '401',
        name: 'Error401',
        component: '@views/401',
        meta: { title: '401', remixIcon: 'error-warning-line' },
      },
      {
        path: '404',
        name: 'Error404',
        component: '@views/404',
        meta: { title: '404', remixIcon: 'error-warning-line' },
      },
    ],
  },
];
module.exports = [
  {
    url: '/menu/navigate',
    type: 'get',
    response() {
      return {
        code: 0,
        msg: 'success',
        data,
      };
    },
  },
];
